home *** CD-ROM | disk | FTP | other *** search
/ Freaks Macintosh Archive / Freaks Macintosh Archive.bin / Freaks Macintosh Archives / Ham⁄GPS / SoftKiss.src.1.8 Folder / SoftKiss.src.1.8.sit / SoftKiss.src.1.8 / lib / sfk_dyntext.h < prev    next >
Text File  |  1992-07-19  |  803b  |  35 lines

  1. /*
  2.  * sfk_dyntext.c - dynamicly loaded text
  3.  */
  4.  
  5. /*
  6.  * routine to free memory allocated by dyntext
  7.  */
  8. typedef void (*free_rtn)(void *);
  9.  
  10. /*
  11.  * routine to allocate memory
  12.  */
  13. typedef void *(*alloc_rtn)(unsigned long alloc_size);
  14.  
  15. struct dyn_text_R {
  16.     char dispose_thand;            /*thand has been detached so free it*/
  17.     unsigned short nstrs;        /*number of strings*/
  18.     Handle thand;                /*handle to text*/
  19.     unsigned char *tptr;        /*pointer to text*/
  20.     unsigned short *tstrs;        /*pointers to strings*/
  21.     free_rtn fr;                /*routine to free tstrs when done*/
  22. };
  23. typedef struct dyn_text_R dyn_text,*dyn_text_pt;
  24.  
  25. /*
  26.  * read in a dynamic text block
  27.  * return TRUE if successfull
  28.  */
  29. int sfk_dt_load(short res_id,dyn_text_pt dt,alloc_rtn ar,free_rtn fr);
  30.  
  31. /*
  32.  * clean up a dt text block
  33.  */
  34. void sfk_dt_free(dyn_text_pt dt);
  35.